#pragma once

class SettingsDialog : public Singleton<SettingsDialog>, public DialogProto
{
	Checkbox<SettingsDialog>* m_hlEnabled;
	RadioButton<SettingsDialog>* mSolid, *mOuter, *mNone;
	RadioButton<SettingsDialog>* mAnimCur, *mNormCur;
	ui32 mBrushType;
	
	void HLCheckProc(Checkbox<SettingsDialog>*, ui32) { }
	void ScrollBarProc(Scrollbar<SettingsDialog>* pBar, ui32 value);
	void TypeSolidProc(RadioButton<SettingsDialog>* button, bool checked);
	void TypeOuterProc(RadioButton<SettingsDialog>* button, bool checked);
	void TypeNoneProc(RadioButton<SettingsDialog>* button, bool checked);
	void TypeAnimProc(RadioButton<SettingsDialog>* button, bool checked);
	void TypeNormProc(RadioButton<SettingsDialog>* button, bool checked);

	float m_hlDist;
public:
	SettingsDialog();
	bool GetHLEnabled() { return m_hlEnabled->m_state != 0; }
	void Toggle() { m_dialog->m_visible = !m_dialog->m_visible; }
	float GetHLDistance() { return m_hlDist; }
	void SetHLEnabled(ui32 newVal) { m_hlEnabled->m_state = newVal; }
	ui32& getBrushType() { return mBrushType; }
};

#define sSettings (*SettingsDialog::GetInstance())